<template>
<!-- 	<view class="content" v-if="flag">
		<view class="my">
			<view class="username" @tap='set'>
				<view>
					<image class="user" src="../../static/images/aj.png"></image>
				</view>
				<view class="usermessage">
					<text>阙玉佩</text>
					<text>136******63</text>
				</view>
			</view>
			<view class="none">
				<text>未完善</text>
				<uni-icons style="color: white;" size="12" type="arrowright"></uni-icons>
			</view>
		</view>

		<view class="money">
			<view class="title">
				<view @tap="mywallet">
					<text>|</text>
					<text>我的钱包</text>
				</view>
				<view @tap="mywallet">
					<uni-icons type="arrowright"></uni-icons>
				</view>
			</view>
			<view class="wjs">
				<view>
					<text>未结算金额(元)</text>
					<text style="color: black;">56,250.00</text>
				</view>
				<view>
					<text>已结算金额(元)</text>
					<text>56,250.00</text>
				</view>
			</view>
			<border></border>

			<view class="mymsg">
				<view>
					<image lazy-load src="../../static/images/icon/xx.png"></image>
					我的消息
				</view>
				<view>
					<uni-icons type="arrowright"></uni-icons>
				</view>
			</view>

			<view class="mymsg" @tap="gotobaofei">
				<view @tao="baofei">
					<image src="../../static/images/icon/money.png"></image>
					保费管理
				</view>
				<view>
					<uni-icons lazy-load type="arrowright"></uni-icons>
				</view>
			</view>

			<view class="mymsg">
				<view>
					<image lazy-load src="../../static/images/icon/add.png"></image>
					我的小伙伴
				</view>
				<view>
					<uni-icons type="arrowright"></uni-icons>
				</view>
			</view>
			<border></border>
			<view class="mymsg">
				<view>
					<image lazy-load src="../../static/images/icon/gaizhang2.png"></image>
					车险审核
				</view>
				<view>
					<uni-icons type="arrowright"></uni-icons>
				</view>
			</view>
			<view class="mymsg">
				<view>
					<image lazy-load src="../../static/images/icon/kefu3.png"></image>
					联系客服
				</view>
				<view>
					<uni-icons type="arrowright"></uni-icons>
				</view>
			</view>
			<view class="mymsg" @tap='gotoset'>
				<view>
					<image lazy-load src="../../static/images/icon/shezhi2.png" mode=""></image>
					设置
				</view>
				<view>
					<uni-icons type="arrowright"></uni-icons>
				</view>
			</view>
		</view>
		
	</view>
	
	<view v-else>
		<login></login>
	</view> -->
	<view v-if="flag">
		<user></user>
	</view>
	<view v-else>
		<login></login>
	</view>
</template>

<script>
	import login from '../../components/login.vue'
	import user from '../../components/user.vue'
	export default {
		data() {
			return {
				flag :true
			}
		},
		components: {
			login,
			user
		},
		onShow() {
			    const value = uni.getStorageSync('token');
				console.log(value === '')
				if(value === ''){
					this.flag = false;
				}
		}
	}
</script>

<style scoped lang="scss">

</style>
